package com.onedec.attendance.executor;

import com.onedec.attendance.service.AttendanceService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DailyAttendGenerator {
    @Autowired
    private AttendanceService attendanceService;

    @XxlJob(value ="blowjobhandler" )
    public ReturnT<String> execute(String s) throws Exception {
        System.out.println("lailelaile");
        attendanceService.insertDailyAttend();
        System.out.println("今日考勤已经生成！");
        return ReturnT.SUCCESS;
    }
}
